package com.markhsiu.lizi;

public class CommonValidate {

	public static String validate(String data) {

		// data 可以为空字符串 “”
		String _sign;
		if (data != null) {
			_sign = MD5Util.EncryptionStr(CommonParams.PRE_KEY + MD5Util.EncryptionStr(data) + CommonParams.BAC_KEY);
		} else {
			_sign = MD5Util.EncryptionStr(CommonParams.PRE_KEY + CommonParams.BAC_KEY);
		}

		return _sign;
	}
 

	public static void main(String[] args) {
		String sign = CommonValidate.validate("skuIds=58eb30b1e4b0dcee7dfc6160,554dae3ce4b0a4e489d1b1f9|");
		System.out.println(sign);
	}
}
